package com.gitee.wsl.io.file

import kotlinx.io.Sink

interface RandomAccessFile : AutoCloseable {
    fun readBytes(position: Long, bytes: ByteArray, offset: Int = 0, length: Int = bytes.size)
    fun writeBytes(position: Long, bytes: ByteArray, offset: Int = 0, length: Int = bytes.size)
    fun transferTo(position: Long, sink: Sink, length: Long)
    override fun close()
}